<?xml version="1.0" encoding="UTF-8"?>
<TFSWorkItemDataMigrationRules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                               xsi:noNamespaceSchemaLocation="file:///C:/YourPath/TFSWIMorphyingConfig.xsd">
  <!--Make sure schema is available at the correct path above-->
	<ConnectionDetails>
		<CollectionURL>http://tfsserver:8080/tfs/DefaultCollection</CollectionURL>
		<!--
		It should be possible to list many projects by adding new ProjectName elements within Projects element.
		ProjectName should be case insensitive. i.e. DShah-Morphing is same as dshah-morphing.
		[Optional] - It should be possible to use whildcard characters like estrics and understores to represent "any" OR "one" characters respectively in ProjectName value.
		-->
		<Projects>
			<ProjectName>DShah-RangerDemo</ProjectName>
		</Projects>
		<!-- 
		Credentials are optional if not supplied then the application will automatically 
		use currently logged-on user's account for logging into TFS. 
		-->
		<Credentials>
			<UserID/>
			<Password/>
		</Credentials>
	</ConnectionDetails>
	<WorkItemTypes>
		<WorkItemType Name="Product Backlog Item">
			<FieldMap>
				<MappedFields>
					<!--
					- If LeftName is NOT EQUAL to RightName then it will be data migration from the left field to right field.
					- If LeftName is NOT EQUAL to RightName and if it has valueMap attribute then it will take values from the left and migrate it to mapped value on the right.
					- If LeftName is EQUAL to RightName then it should also have valueMap attribute for transforming data within the same field. e.g. changing Status field workflow.
					- It should be possible to use Int type of field for LeftName and Double type of field for RightName as we can migrate data from int to double.
					- It should be possible to use PlainText type of field for LeftName and HTML type of field for RightName as we can migrate data from PlainText to HTML.
					-->
					<MappedField LeftName="Scrum.v3.BusinessValue" RightName="Microsoft.VSTS.Common.BusinessValue"/>
					<MappedField LeftName="Microsoft.VSTS.Scheduling.StoryPoints" RightName="Microsoft.VSTS.Scheduling.Effort"/>
					<MappedField LeftName="Scrum.DefinitionOfDone" RightName="Microsoft.VSTS.Common.AcceptanceCriteria"/>
					<MappedField LeftName="System.State" RightName="System.State" ValueMap="PBIStateValueMap"/>
				</MappedFields>
			</FieldMap>
			<ValueMaps>
				<!--
				- ValueMap element's Name attribute is used for cross referencing into MappedField element's valueMap attribute above.
				- It should be possible to have several ValueMap elements within ValueMaps element.
				-->
				<ValueMap Name="PBIStateValueMap">
					<Values>
						<Value LeftValue="Not Started" RightValue="New"/>
						<Value LeftValue="In Progress" RightValue="Committed"/>
						<Value LeftValue="Done" RightValue="Done"/>
						<Value LeftValue="Descoped" RightValue="Removed"/>
						<Value LeftValue="Broken" RightValue="New"/>
						<Value LeftValue="Deprecated" RightValue="Removed"/>
						<Value LeftValue="Deleted" RightValue="Removed"/>
					</Values>	
				</ValueMap>
			</ValueMaps>
			<LinkTypeMappings>
				<LinkTypeMapping LeftLinkType="Scrum.ImplementedBy" RightLinkType="System.LinkTypes.Hierarchy"/> 
				<LinkTypeMapping LeftLinkType="Scrum.FailedBy" RightLinkType="Microsoft.VSTS.Common.TestedBy"/> 
			</LinkTypeMappings>
		</WorkItemType>
		<WorkItemType Name="Bug">
			<FieldMap>
				<MappedFields>
					<MappedField LeftName="System.State" RightName="System.State" ValueMap="BugStateValueMap"/>
					<MappedField LeftName="Scrum.v3.TestingImpact" RightName="Microsoft.VSTS.Common.Severity" ValueMap="TestingImpactValueMap"/>
				</MappedFields>
			</FieldMap>
			<ValueMaps>
				<ValueMap Name="BugStateValueMap">
					<Values>
						<Value LeftValue="Active" RightValue="New"/>
						<Value LeftValue="Closed" RightValue="Done"/>
						<Value LeftValue="Ready for Test" RightValue="Committed"/>
						<Value LeftValue="Ignored" RightValue="Removed"/>
						<Value LeftValue="Deleted" RightValue="Removed"/>
					</Values>	
				</ValueMap>
				<ValueMap Name="TestingImpactValueMap">
					<Values>
						<Value LeftValue="1 - Blocking" RightValue="1 - Critical"/>
						<Value LeftValue="2 - Critical" RightValue="1 - Critical"/>
						<Value LeftValue="3 - High" RightValue="2 - High"/>
						<Value LeftValue="4 - Medium" RightValue="3 - Medium"/>
						<Value LeftValue="5 - Low" RightValue="4 - Low"/>
					</Values>	
				</ValueMap>
			</ValueMaps>
			<LinkTypeMappings>
				<LinkTypeMapping LeftLinkType="Scrum.FailedBy" RightLinkType="Microsoft.VSTS.Common.TestedBy"/> 
			</LinkTypeMappings>
		</WorkItemType>		
		<WorkItemType Name="Impediment">
			<FieldMap>
				<MappedFields>
					<MappedField LeftName="System.State" RightName="System.State" ValueMap="ImpedimentStateValueMap"/>
				</MappedFields>
			</FieldMap>
			<ValueMaps>
				<ValueMap Name="ImpedimentStateValueMap">
					<Values>
						<Value LeftValue="Resolved" RightValue="Closed"/>
						<Value LeftValue="Deleted" RightValue="Closed"/>
					</Values>	
				</ValueMap>
			</ValueMaps>
			<LinkTypeMappings>
				<LinkTypeMapping LeftLinkType="Scrum.ImpededBy" RightLinkType="System.LinkTypes.Hierarchy"/> 
			</LinkTypeMappings>
		</WorkItemType>		
		<WorkItemType Name="Acceptance Test">
			<FieldMap>
				<MappedFields>
					<MappedField LeftName="System.State" RightName="System.State" ValueMap="AcceptanceTestStateValueMap"/>
				</MappedFields>
			</FieldMap>
			<ValueMaps>
				<ValueMap Name="AcceptanceTestStateValueMap">
					<Values>
						<Value LeftValue="Not Implemented" RightValue="Design"/>
						<Value LeftValue="Ready for Test" RightValue="Ready"/>
						<Value LeftValue="Failed" RightValue="Design"/>
						<Value LeftValue="Passed" RightValue="Closed"/>
						<Value LeftValue="Deleted" RightValue="Closed"/>
					</Values>	
				</ValueMap>
			</ValueMaps>
			<LinkTypeMappings>
				<LinkTypeMapping LeftLinkType="Scrum.FailedBy" RightLinkType="Microsoft.VSTS.Common.TestedBy"/> 
			</LinkTypeMappings>
		</WorkItemType>			
		<WorkItemType Name="Sprint Backlog Task">
			<FieldMap>
				<MappedFields>
					<MappedField LeftName="Scrum.v3.TaskPriority" RightName="Microsoft.VSTS.Common.BacklogPriority"/>
					<MappedField LeftName="Scrum.v3.WorkRemaining"  RightName="Microsoft.VSTS.Scheduling.RemainingWork" />
					<MappedField LeftName="System.State" RightName="System.State" ValueMap="SBTStateValueMap"/>
				</MappedFields>
			</FieldMap>
			<ValueMaps>
				<ValueMap Name="SBTStateValueMap">
					<Values>
						<Value LeftValue="Not Started" RightValue="To Do"/>
						<Value LeftValue="Deleted" RightValue="Removed"/>
						<Value LeftValue="Descoped" RightValue="Removed"/>
					</Values>	
				</ValueMap>
			</ValueMaps>
			<LinkTypeMappings>
				<LinkTypeMapping LeftLinkType="Scrum.ImplementedBy" RightLinkType="System.LinkTypes.Hierarchy"/> 
			</LinkTypeMappings>
		</WorkItemType>			
	</WorkItemTypes>
</TFSWorkItemDataMigrationRules>
